{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Title: #Fizz Buzz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Difficulty: #Easy"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Category Title: #Algorithms"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Tag Slug: #math #string #simulation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Name Translated: #数学 #字符串 #模拟"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solution Name: fizzBuzz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Translated Title: #Fizz Buzz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Translated Content:\n",
    "<p>给你一个整数 <code>n</code> ，找出从 <code>1</code> 到 <code>n</code> 各个整数的 Fizz Buzz 表示，并用字符串数组 <code>answer</code>（<strong>下标从 1 开始</strong>）返回结果，其中：</p>\n",
    "\n",
    "<ul>\n",
    "\t<li><code>answer[i] == \"FizzBuzz\"</code> 如果 <code>i</code> 同时是 <code>3</code> 和 <code>5</code> 的倍数。</li>\n",
    "\t<li><code>answer[i] == \"Fizz\"</code> 如果 <code>i</code> 是 <code>3</code> 的倍数。</li>\n",
    "\t<li><code>answer[i] == \"Buzz\"</code> 如果 <code>i</code> 是 <code>5</code> 的倍数。</li>\n",
    "\t<li><code>answer[i] == i</code> （以字符串形式）如果上述条件全不满足。</li>\n",
    "</ul>\n",
    "\n",
    "<p>&nbsp;</p>\n",
    "\n",
    "<p><strong>示例 1：</strong></p>\n",
    "\n",
    "<pre>\n",
    "<strong>输入：</strong>n = 3\n",
    "<strong>输出：</strong>[\"1\",\"2\",\"Fizz\"]\n",
    "</pre>\n",
    "\n",
    "<p><strong>示例 2：</strong></p>\n",
    "\n",
    "<pre>\n",
    "<strong>输入：</strong>n = 5\n",
    "<strong>输出：</strong>[\"1\",\"2\",\"Fizz\",\"4\",\"Buzz\"]\n",
    "</pre>\n",
    "\n",
    "<p><strong>示例 3：</strong></p>\n",
    "\n",
    "<pre>\n",
    "<strong>输入：</strong>n = 15\n",
    "<strong>输出：</strong>[\"1\",\"2\",\"Fizz\",\"4\",\"Buzz\",\"Fizz\",\"7\",\"8\",\"Fizz\",\"Buzz\",\"11\",\"Fizz\",\"13\",\"14\",\"FizzBuzz\"]</pre>\n",
    "\n",
    "<p>&nbsp;</p>\n",
    "\n",
    "<p><strong>提示：</strong></p>\n",
    "\n",
    "<ul>\n",
    "\t<li><code>1 &lt;= n &lt;= 10<sup>4</sup></code></li>\n",
    "</ul>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Description: [fizz-buzz](https://leetcode.cn/problems/fizz-buzz/description/)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solutions: [fizz-buzz](https://leetcode.cn/problems/fizz-buzz/solutions/)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_cases = ['3', '5', '15']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n):\n",
    "        \"\"\"\n",
    "        :type n: int\n",
    "        :rtype: List[str]\n",
    "        \"\"\"\n",
    "        ans = []\n",
    "        for i in range (1,n+1):\n",
    "            if (i%3 == 0 and i%5!=0):\n",
    "                ans.append(\"Fizz\")\n",
    "            elif(i%3!=0 and i%5==0):\n",
    "                ans.append(\"Buzz\")\n",
    "            elif(i%3 ==0 and i%5==0):\n",
    "                ans.append(\"FizzBuzz\")\n",
    "            else:\n",
    "                ans.append(str(i))\n",
    "        return ans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n):\n",
    "        \"\"\"\n",
    "        :type n: int\n",
    "        :rtype: List[str]\n",
    "        \"\"\"\n",
    "        new = []\n",
    "        for i in range(1, n+1):\n",
    "            if i % 3 == 0 and i %5 == 0:\n",
    "                tmp = \"FizzBuzz\"\n",
    "            elif i % 3 == 0:\n",
    "                tmp = \"Fizz\"\n",
    "            elif i % 5 == 0:\n",
    "                tmp = \"Buzz\"\n",
    "            else:\n",
    "                tmp = str(i)\n",
    "            new.append(tmp)\n",
    "        return new"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n):\n",
    "        \"\"\"\n",
    "        :type n: int\n",
    "        :rtype: List[str]\n",
    "        \"\"\"\n",
    "        \n",
    "        res = []\n",
    "        \n",
    "        for i in range(1, n + 1):\n",
    "            if i % 3 == 0 and i % 5 != 0:\n",
    "                tmp = ['z', 'z', 'i', 'F']\n",
    "            elif i % 3 != 0 and i % 5 == 0:\n",
    "                tmp = ['z', 'z', 'u', 'B']\n",
    "            elif i % 3 == 0 and i % 5 == 0:\n",
    "                tmp = ['z', 'z', 'u', 'B', 'z', 'z', 'i', 'F']\n",
    "            else:\n",
    "                tmp = []\n",
    "                while i > 0:\n",
    "                    tmp.append(chr(ord('0') + int(i % 10)))\n",
    "                    i //= 10\n",
    "            \n",
    "            tmp.reverse()\n",
    "            res.append(\"\".join(tmp))\n",
    "        \n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "\tdef fizzBuzz(self, n):\n",
    "\t\t\"\"\"\n",
    "\t\t:type n: int\n",
    "\t\t:rtype: List[str]\n",
    "\t\t\"\"\"\n",
    "\t\tresult = [str(i) for i in range(1, n + 1)]\n",
    "\t\tfor i in range(2, n, 3):\n",
    "\t\t\tresult[i] = \"Fizz\"\n",
    "\t\tfor i in range(4, n, 5):\n",
    "\t\t\tresult[i] = \"Buzz\"\n",
    "\t\tfor i in range(14, n, 15):\n",
    "\t\t\tresult[i] = \"FizzBuzz\"\n",
    "\t\treturn result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        result = [str(i) for i in range(1,n+1)]\n",
    "        for i in range(n):\n",
    "            if (i+1) % 3 == 0 and (i+1) % 5 == 0:\n",
    "                result[i] = 'FizzBuzz'\n",
    "            elif (i+1) % 3 == 0:\n",
    "                result[i] = 'Fizz'\n",
    "            elif(i+1) % 5 == 0:\n",
    "                result[i] = 'Buzz'\n",
    "        return result\n",
    "                "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n):\n",
    "        \"\"\"\n",
    "        :type n: int\n",
    "        :rtype: List[str]\n",
    "        \"\"\"\n",
    "        a=[0]*n\n",
    "        k3=1\n",
    "        k5=1\n",
    "        for i in range(0,n):\n",
    "            print (k3,k5,i)\n",
    "            if k3==3 and k5==5 :\n",
    "                a[i]=\"FizzBuzz\"\n",
    "                k3=0\n",
    "                k5=0\n",
    "            elif k3==3 :\n",
    "                    a[i]=\"Fizz\"\n",
    "                    k3=0\n",
    "            elif k5 ==5:\n",
    "                    a[i] =\"Buzz\"\n",
    "                    k5=0\n",
    "                \n",
    "            else:\n",
    "                 a[i]=str(i+1)\n",
    "            k3=k3+1\n",
    "            k5=k5+1\n",
    "            \n",
    "        return a\n",
    "            \n",
    "        \n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        def transform(x):\n",
    "            if x%3==0 and x%5==0:\n",
    "                return \"FizzBuzz\"\n",
    "            elif x%3==0:\n",
    "                return \"Fizz\"\n",
    "            elif x%5==0:\n",
    "                return \"Buzz\"\n",
    "            else:\n",
    "                return str(x)\n",
    "        return map(transform,range(1,n+1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "from typing import List\n",
    "\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        res = []\n",
    "        for i in range(1, n + 1):\n",
    "            if i % 3 == 0 and i % 5 == 0:\n",
    "                res.append('FizzBuzz')\n",
    "            elif i % 3 == 0:\n",
    "                res.append('Fizz')\n",
    "            elif i % 5 == 0:\n",
    "                res.append('Buzz')\n",
    "            else:\n",
    "                res.append(str(i))\n",
    "        return res\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        li = []\n",
    "        for i in range(1,n+1):\n",
    "            if(i%3==0 and i%5==0):\n",
    "                li.append(\"FizzBuzz\")\n",
    "            elif(i%3==0):\n",
    "                li.append(\"Fizz\")\n",
    "            elif(i%5==0):\n",
    "                li.append(\"Buzz\")\n",
    "            else:\n",
    "                li.append(str(i))\n",
    "        return li"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        \n",
    "        resList = []\n",
    "        if n == 0:\n",
    "            return resList\n",
    "        \n",
    "        for i in range(n):\n",
    "            \n",
    "            num = i + 1\n",
    "            if (num % 3 == 0) & (num % 5 == 0):\n",
    "                resList.append(\"FizzBuzz\")\n",
    "            elif (num % 3 == 0):\n",
    "                resList.append(\"Fizz\")\n",
    "            elif (num % 5 == 0):\n",
    "                resList.append(\"Buzz\")\n",
    "            else:\n",
    "                resList.append(str(num))\n",
    "                \n",
    "        return resList"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        List = []\n",
    "        for i in range(1, n+1):\n",
    "            if i % 3 ==0 and i % 5 ==0: List.append('FizzBuzz')\n",
    "            elif i % 3 ==0: List.append('Fizz') \n",
    "            elif i % 5 == 0: List.append('Buzz')\n",
    "            else: List.append(str(i))\n",
    "        return List\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        for i in range(1, n+1):\n",
    "            if i%3 == 0 and i%5 == 0:\n",
    "                yield \"FizzBuzz\"\n",
    "            elif i%3 == 0:\n",
    "                yield \"Fizz\"\n",
    "            elif i%5 == 0:\n",
    "                yield \"Buzz\"\n",
    "            else:\n",
    "                yield str(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        res = []\n",
    "        while n:\n",
    "            s = ''\n",
    "            if n % 3 == 0:\n",
    "                s += 'Fizz'\n",
    "            if n % 5 == 0:\n",
    "                s += 'Buzz'\n",
    "            if not s:\n",
    "                s = str(n)\n",
    "            res.insert(0, s)\n",
    "            n -= 1\n",
    "        return res\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        ans = []\n",
    "        fizz_buzz_dict = {3:\"Fizz\",5:\"Buzz\"}\n",
    "\n",
    "        for num in range(1,n+1):\n",
    "            tmp = \"\"\n",
    "            for key in fizz_buzz_dict.keys():\n",
    "                if num%key==0:\n",
    "                    tmp+=fizz_buzz_dict[key]\n",
    "            if not tmp:\n",
    "                tmp = str(num)\n",
    "            ans.append(tmp)\n",
    "        return ans\n",
    "\n",
    "                    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        result=[]\n",
    "        for i in range(1,n+1):\n",
    "            if i %3==0 and i%5==0:\n",
    "                result.append('FizzBuzz')\n",
    "            elif i%3==0:\n",
    "                result.append('Fizz')\n",
    "            elif i%5==0:\n",
    "                result.append('Buzz')\n",
    "            else:\n",
    "                result.append(str(i))\n",
    "        return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        res=[]\n",
    "        if n==0:return res\n",
    "        for i in range(1,n+1):\n",
    "            if i%3==0 and i%5==0:\n",
    "                res.append('FizzBuzz')\n",
    "            elif i%3==0:\n",
    "                res.append('Fizz')\n",
    "            elif i%5==0:\n",
    "                res.append('Buzz')\n",
    "            else:\n",
    "                i=str(i)\n",
    "                res.append(i)\n",
    "        return res\n",
    "                \n",
    "\n",
    "             \n",
    "                \n",
    "            \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        list = []\n",
    "        for i in range(1,n+1,1):\n",
    "            if i%3==0 and i%5==0:\n",
    "                list.append('FizzBuzz')\n",
    "            elif i%3==0:\n",
    "                list.append('Fizz')\n",
    "            elif i%5==0:\n",
    "                list.append('Buzz')\n",
    "            else:\n",
    "                list.append(str(i))\n",
    "        return list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        res = []\n",
    "\n",
    "        for i in range(1, n + 1):\n",
    "            if i % 15 == 0:\n",
    "                res.append('FizzBuzz')\n",
    "            elif i % 3 == 0:\n",
    "                res.append('Fizz')\n",
    "            elif i % 5 == 0:\n",
    "                res.append('Buzz')\n",
    "            else:\n",
    "                res.append(str(i))\n",
    "\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        l = []\n",
    "        for i in range(n):\n",
    "            if (i+1) % 15 == 0:\n",
    "                c = \"FizzBuzz\"\n",
    "            elif (i+1) % 3 == 0:\n",
    "                c = \"Fizz\"\n",
    "            elif (i+1) % 5 == 0:\n",
    "                c = \"Buzz\"\n",
    "            else:\n",
    "                c = str(i+1)\n",
    "            l.append(c)\n",
    "        return l\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        res = []\n",
    "        for i in range(1, n + 1):\n",
    "            if i % 3 == 0 and i % 5 == 0:\n",
    "                res.append(\"FizzBuzz\")\n",
    "            elif i % 3 == 0:\n",
    "                res.append(\"Fizz\")\n",
    "            elif i % 5 == 0:\n",
    "                res.append(\"Buzz\")\n",
    "            else:\n",
    "                res.append(str(i))\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        ans = []\n",
    "        for i in range(1, n + 1):\n",
    "            # 提前计算布尔值,减少运算\n",
    "            flag1,flag2 = i%3==0,i%5==0\n",
    "            # 使用布尔乘法\n",
    "            if flag1 or flag2:\n",
    "                ans.append('Fizz'*flag1+'Buzz'*flag2)\n",
    "            else:\n",
    "                ans.append(f'{i}')\n",
    "        return ans\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        res = [str(i) for i in range(1, n + 1)]\n",
    "        index = 1\n",
    "        while index <= n / 3:\n",
    "            if index <= n / 5:\n",
    "                res[index * 5 - 1] = 'Buzz'\n",
    "            \n",
    "            if index % 5 == 0:\n",
    "                res[index * 3 - 1] = 'Fizz' + res[index * 3 - 1]\n",
    "            else:\n",
    "                res[index * 3 - 1] = 'Fizz'\n",
    "\n",
    "            index += 1\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        answer = []\n",
    "        result = []\n",
    "        for i in range(n+1):\n",
    "            if i >= 1:\n",
    "                answer.append(str(i))\n",
    "            else:\n",
    "                continue\n",
    "        for j in answer:\n",
    "            k = int(j)\n",
    "            if k%3 == 0 and k%5==0:\n",
    "                result.append(\"FizzBuzz\")\n",
    "            elif k%3 == 0:\n",
    "                result.append(\"Fizz\")\n",
    "            elif k%5 == 0:\n",
    "                result.append(\"Buzz\")    \n",
    "            else:\n",
    "                result.append(str(k)) \n",
    "        return result   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        answer = []\n",
    "        for i in range(1, n + 1):\n",
    "            if i % 3 == 0 and i % 5 == 0:\n",
    "                answer.append(\"FizzBuzz\")\n",
    "            elif i % 3 == 0 and i % 5 != 0:\n",
    "                answer.append(\"Fizz\")\n",
    "            elif i % 3 != 0 and i % 5 == 0:\n",
    "                answer.append(\"Buzz\")\n",
    "            else:\n",
    "                answer.append(str(i))\n",
    "        return answer\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        ans = []\n",
    "        for i in range(1,n + 1):\n",
    "            if not i % 3 and not i % 5:\n",
    "                ans.append('FizzBuzz')\n",
    "            elif not i % 3:\n",
    "                ans.append(\"Fizz\")\n",
    "            elif not i % 5:\n",
    "                ans.append('Buzz')\n",
    "            else:\n",
    "                ans.append(str(i))\n",
    "        \n",
    "        return ans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def fizzBuzz(self, n: int) -> List[str]:\n",
    "        a=[]\n",
    "        for i in range(1,n+1):\n",
    "            if i%3==0 and i%5==0:\n",
    "                a.append(\"FizzBuzz\")\n",
    "            elif i%3==0:\n",
    "                a.append(\"Fizz\")\n",
    "            elif i%5==0:\n",
    "                a.append(\"Buzz\")\n",
    "            else:\n",
    "                a.append(str(i))\n",
    "        return a"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 2
}
